package cn.kgc.crowdfundingadmin3.mapper;


import cn.kgc.crowdfundingadmin3.pojo.Auth;
import cn.kgc.crowdfundingadmin3.pojo.AuthExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AuthMapper {
    int countByExample(AuthExample example);

    int deleteByExample(AuthExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Auth record);

    int insertSelective(Auth record);

    List<Auth> selectByExample(AuthExample example);

    Auth selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Auth record, @Param("example") AuthExample example);

    int updateByExample(@Param("record") Auth record, @Param("example") AuthExample example);

    int updateByPrimaryKeySelective(Auth record);

    int updateByPrimaryKey(Auth record);
    //根据角色查询权限id
    public List<Integer> getAssignedAuthIdList(Integer roleId);

    //删除权限关系
    public void deleteRelationship(Integer roleId);
    //添加权限关系
    public void insertRelationship(@Param("roleId") Integer roleId, @Param("authIdList") List<Integer> authIdList);
    //根据角色查询权限
    public List<Auth> selectByRoleIds(@Param("roleIds") List<Integer> roleIds);
}